package edu.ccut.saturn.studio.wfg.wfgmodel;

import org.w3c.dom.Document;
import org.w3c.dom.Node;

import edu.ccut.saturn.studio.core.util.xml.SaturnW3CUtil;


public class SaturnMultiWork {

	// 启动多工作项
	private String isMultiWorkItem = "-1";
	
	// 全部完成 1， 完成个数 2， 完成百分比 3
	private String isFinishAll = "1";
	
	// 要求完成个数
	private String finishRequiredNum = "-1";
	
	// 要求完成百分比
	private String finishRequiredPercent = "0";
	
	// 未完成工作项自动终止
	private String isAutoCancel = "-1";

	public String getIsMultiWorkItem() {
		return isMultiWorkItem;
	}

	public void setIsMultiWorkItem(String isMultiWorkItem) {
		this.isMultiWorkItem = isMultiWorkItem;
	}

	public String getIsFinishAll() {
		return isFinishAll;
	}

	public void setIsFinishAll(String isFinishAll) {
		this.isFinishAll = isFinishAll;
	}

	public String getFinishRequiredNum() {
		return finishRequiredNum;
	}

	public void setFinishRequiredNum(String finishRequiredNum) {
		this.finishRequiredNum = finishRequiredNum;
	}

	public String getFinishRequiredPercent() {
		return finishRequiredPercent;
	}

	public void setFinishRequiredPercent(String finishRequiredPercent) {
		this.finishRequiredPercent = finishRequiredPercent;
	}

	public String getIsAutoCancel() {
		return isAutoCancel;
	}

	public void setIsAutoCancel(String isAutoCancel) {
		this.isAutoCancel = isAutoCancel;
	}
	
	void createNode(Document document, Node node){
		SaturnW3CUtil.createChildNode(node, SaturnName.KEY_NODE_ELEMENT_ISMULTIWORKITEM, this.isMultiWorkItem);
		SaturnW3CUtil.createChildNode(node, SaturnName.KEY_NODE_ELEMENT_ISFINISHALL, this.isFinishAll);
		SaturnW3CUtil.createChildNode(node, SaturnName.KEY_NODE_ELEMENT_FINISHREQUIREDNUM, this.finishRequiredNum);
		SaturnW3CUtil.createChildNode(node, SaturnName.KEY_NODE_ELEMENT_FINISHREQUIREDPERCENT, this.finishRequiredPercent);
		SaturnW3CUtil.createChildNode(node, SaturnName.KEY_NODE_ELEMENT_ISAUTOCANCEL, this.isAutoCancel);
	}
}
